<%-- 
    Document   : CadastroProfessor
    Created on : 01/11/2011, 22:05:58
    Author     : Filipe
--%>

<%@page import="br.com.ufpb.halloc.negocio.Departamento"%>
<%@page import="java.util.ArrayList, br.com.ufpb.halloc.comunicacao.Facade"%>
<%@page import="br.com.ufpb.halloc.negocio.Disciplina"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Halloc - Cadastro de Professor</title>
    <style type="text/css">
            div#back {
                background-color: lightsteelblue;
                height: 370px;
                width: 800px;
                margin-top: 20px;
                margin-left: 250px;
                margin-right: 250px;
            }
            div#form {
                background-color: #DDD;
                font: 14px Verdana, sans-serif;
                height: 180px;
                margin-top: 5px;
                border: 0px solid #696969;
                margin-left: 150px;
                margin-right: 150px;
            }
            
            div#campos, div#form {
                color: #333;
            }
            
            div#campos, div#tab_inputs tr{                
                font: 16px Verdana, sans-serif;
                color: #369;
                font-weight: bolder;                
            }
            
            select {
                font: 16px Verdana, sans-serif;
                color: #369;
                font-weight: bolder;
            }
            
            #campos select {
                width:400px;
                height: 30px;
                opacity:1;
                filter:alpha(opacity=0);
                margin-left: 100px;
            }
            
            .icod, .icarga, .icred {
                width: 100px;
                height: 20px;
                font: 16px Verdana, sans-serif;
                color: #333;
                font-weight: bolder;
            }
            
            .inome {
                width: 350px;
                height: 20px;
                font: 16px Verdana, sans-serif;
                color: #333;
                font-weight: bolder;
            }
            
        </style>

    <body>
        <jsp:include page="menubarra.jsp"></jsp:include>
           
        <div id="back">
            <h2 align="center">Cadastro de Professor</h2> 
            
            <h3 align="center">${mensagem}</h3>
           <div id="form">
            <div id="campo">
                
            <form method="post" action="CadastroProfessor">
                <table>
                    <tr> 
                        <td>Departamento:</td>
                        <td><select id="departamento" name="departamento" >
                    <%
                    Facade fachada = Facade.getInstance();
                    List<Departamento> departamentos = (List<Departamento>) fachada.gettodosOsDepartamentosBD();
                    for (Departamento d : departamentos) {
                    %>
                        <option value="<%=d.getCodDepartamento()%>" id="<%=d.getCodDepartamento()%>"><%=d.getNomeDepartamento()%></option>
                    <% } %>    
                    </select>
                        </td>
                  </tr>
                  <tr>
                        <td width="60">Matricula:</td>
                <td width="602"><input type="text" name="matricula_professor" value="${professor.matricula}"></input></td>
                  </tr>
                    <tr>
                        <td>Nome:</td>
                        <td><input name="nome_professor" type="text" value="${professor.nome}" size="40" maxlength="200">
                      </input></td>
                    </tr>
                    <tr>
                        <td>Telefone:</td>
                        <td><input type="text" name="telefone_professor" value="${professor.telefone}"</td>
                    </tr>
                   
                </table>
            </div> 
           </div>    
                     <center>
                        <td colspan="2" align="center"><input type="submit" value="Cadastrar"></input></td>

                    </center>    
          </form>
            
        
        </div> 
        
    </body>
</html>
